<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function f1() {
        console.log("Hello1!");
      }
      function f2() {
        console.log("Hello2!");
      }
      function f3() {
        console.log("Hello3!");
      }
      Function.prototype.defer = function (s) {
        const a = this;
        setTimeout(function () {
          a(); //执行函数
        }, s);
      };
      f1.defer(1000);
      f2.defer(2000);
      f3.defer(3000);
    </script>
  </body>
</html>
